﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Model;
using System.Data.SqlClient;
using DuncanDAL;

namespace BLL.PayRecordsTransaction
{
    public class UpdatePayRecordsTransaction:ICommand
    {
        private T_PayRecordsObject newPayRecord;

        public UpdatePayRecordsTransaction(T_PayRecordsObject _newPayRecord)
        {
            newPayRecord = _newPayRecord;
        }

        #region ICommand 成员

        public void Execute()
        {
            try
            {
                PayRecordsDataService objPayRecordsDataService = new PayRecordsDataService();
                objPayRecordsDataService.Update(newPayRecord);
            }
            catch (SqlException e)
            {
                throw e;
            }
        }

        #endregion
    }
}
